
<!doctype html>
<html lang="en">
  <head id="head">
    <meta charset="UTF-8" />
    <link id="favicon" rel="icon" type="image/svg+xml" href="/frontend/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body id="eo-body">
    <div id="root"></div>
    <script type="module" src="/src/main.tsx"></script>
    <script>
      document.addEventListener('DOMContentLoaded', () => {
        const eoBody = document.getElementById('eo-body');
        const favicon = document.getElementById('favicon');

        const createScript = (id, src) => {
          const script = document.createElement('script');
          script.id = id;
          script.async = true;
          script.src = src;
          return script;
        };

        const iconparkApintoSrc = window.location.hostname === 'localhost' ? '/iconpark_apinto.js' : '/frontend/iconpark_apinto.js';
        const iconparkEolinkSrc = window.location.hostname === 'localhost' ? '/iconpark_eolink.js' : '/frontend/iconpark_eolink.js';
        const faviconSrc = window.location.hostname === 'localhost' ? '/favicon.ico' : '/frontend/favicon.ico';

        favicon.href = faviconSrc;

        eoBody.appendChild(createScript('iconpark_apinto', iconparkApintoSrc));
        eoBody.appendChild(createScript('iconpark_eolink', iconparkEolinkSrc));
      });
    </script>
  </body>
</html>
